from fastapi import FastAPI,Form,File, UploadFile       # form表单，文件上传等功能
from typing import Union, List, Optional    # 多重类型
from pydantic import BaseModel, Field, ValidationError  # 类型强校验
import uvicorn
from apps.my_cash_info.urls import router_mycash

app = FastAPI()
# 接入子路由
app.include_router(router_mycash,prefix='/cash',tags=["个人流水接口"])

@app.get("/")
async def root():
    return {"message": "Hello yuan"}
@app.get('/home/{id}',tags=["查询id"])
async def home(id:int):
    return {"查询的是":id}
 
if __name__ == '__main__':
    uvicorn.run("main:app", host="127.0.0.1", port=8080, reload=True)